package com.wzz.sparkDemo

import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}

object SparkWordCount {

  def main(args: Array[String]): Unit = {
    val sparkconf: SparkConf = new SparkConf().setMaster("local").setAppName("sdfs")
    val sc: SparkContext = SparkContext.getOrCreate(sparkconf)
    val rdd: RDD[String] = sc.textFile("hdfs://hadoop100:8020/a.txt")
    val rdd2: RDD[String] = rdd.flatMap(_.split(" "))

  }

}
